using System;
using System.Collections;
using System.Web;
using Sedna.Core.Security;

namespace Sedna.Core.Controller.Common
{
	/// <summary>
	/// Summary description for AbstractExceptionHandler.
	/// </summary>
	public abstract class AbstractExceptionHandler : IExceptionHandler
	{
		protected string successStatus = "success";
		protected Type exceptionType = typeof(Exception);
		protected IPrincipalWrapper principalWrapper;

		public string SuccessStatus
		{
			set { successStatus = value; }
		}

		public virtual Type ExceptionType
		{
			get { return exceptionType; }
			set { exceptionType = value; }
		}

		public IPrincipalWrapper PrincipalWrapper
		{
			set { principalWrapper = value; }
		}


		public abstract IActionResult HandleException(IExecutionContext executionContext, Exception exception);
	}
}
